package com.googlecode.tinyjava.syntaxtree;

import lombok.Getter;
import lombok.Setter;

public class ReturnStatement extends Statement {
	@Getter
	@Setter
	private Expression expression;

	public ReturnStatement() {
		super(null);
	}
	
	public void print() {
		System.out.print("return");
		if (expression != null) {
			System.out.print(" ");
			expression.print();
		}
		System.out.println(";");
	}

}
